package com.ruoyi.galaxy.api;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpMethod;

/**
 * @author yeoman
 * 银河票务api枚举
 */
@Getter
@AllArgsConstructor
public enum GalaxyApiEnum {

    /**
     * 获取商品列表
     */
    GET_PROJECT_LIST(GalaxyApiConstant.GET_PROJECT_LIST, HttpMethod.GET),
    /**
     * 获取商品
     */
    GET_PROJECT(GalaxyApiConstant.GET_PROJECT, HttpMethod.GET),
    /**
     * 获取商品场次票档
     */
    GET_PROJECT_EVENT(GalaxyApiConstant.GET_PROJECT_EVENT, HttpMethod.GET),
    /**
     * 获取订单列表
     */
    GET_ORDER_LIST(GalaxyApiConstant.GET_ORDER_LIST, HttpMethod.GET),

    /**
     * 交易-添加购物车
     */
    TRADE_ADD_CART(GalaxyApiConstant.TRADE_ADD_CART, HttpMethod.POST),

    /**
     * 购物车-检查商品是否可售
     */
    SHOPPING_CART_CHECK_GOOD_SALE(GalaxyApiConstant.SHOPPING_CART_CHECK_GOOD_SALE, HttpMethod.POST),

    /**
     * 交易-确认订单
     */
    TRADE_CONFIRM_CART(GalaxyApiConstant.TRADE_CONFIRM_CART, HttpMethod.POST),

    /**
     * 交易-提交订单
     */
    TRADE_SUBMIT_CART(GalaxyApiConstant.TRADE_SUBMIT_CART, HttpMethod.POST);

    /**
     * api url
     */
    private final String url;
    /**
     * http method
     */
    private final HttpMethod httpMethod;

}
